<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 
        splice  增加,删除,修改
        splice(index,howmany,value)
     -->
     <script>
         /* 1.删除  arr.splice(index,howmany)*/
        /*  2.修改  arr.splice(index,howmany,value) */
        /* 
        3.增加  tip:从下标的前面增加  arr.splice(index,0,value)
         */
         let arr = [1,2,3,4];  //[1,2,3,0,4]
         arr.splice(3,0,0)
         console.log(arr);
     </script>
</body>
</html>